package o;

import android.annotation.TargetApi;
import android.content.Context;
import android.view.MotionEvent;

@TargetApi(5)
class blv$d extends blv$b {
    private int ʽ = -1;
    private int ॱॱ = 0;

    public blv$d(Context context) {
        super(context);
    }

    float ॱ(MotionEvent motionEvent) {
        try {
            return motionEvent.getX(this.ॱॱ);
        } catch (Exception e) {
            return motionEvent.getX();
        }
    }

    float ˊ(MotionEvent motionEvent) {
        try {
            return motionEvent.getY(this.ॱॱ);
        } catch (Exception e) {
            return motionEvent.getY();
        }
    }

    public boolean ˏ(MotionEvent motionEvent) {
        int i = 0;
        switch (motionEvent.getAction() & 255) {
            case 0:
                this.ʽ = motionEvent.getPointerId(0);
                break;
            case 1:
            case 3:
                this.ʽ = -1;
                break;
            case 6:
                int action = (motionEvent.getAction() & 65280) >> 8;
                if (motionEvent.getPointerId(action) == this.ʽ) {
                    if (action == 0) {
                        action = 1;
                    } else {
                        action = 0;
                    }
                    this.ʽ = motionEvent.getPointerId(action);
                    this.ˋ = motionEvent.getX(action);
                    this.ˎ = motionEvent.getY(action);
                    break;
                }
                break;
        }
        if (this.ʽ != -1) {
            i = this.ʽ;
        }
        this.ॱॱ = motionEvent.findPointerIndex(i);
        return super.ˏ(motionEvent);
    }
}
